<template>
    <div class="header">
      <div class="header-left">
        <span class="iconfont">&#xe624;</span>
      </div>
      <div class="header-center">
        <span class="iconfont">&#xe632;</span>
        <i>输入景点</i>
      </div>
      <router-link to="/city">
        <div class="header-right">
          <i>{{this.$store.state.city}}</i>
          <span class="iconfont">&#xe64a;</span>
        </div>
      </router-link>
    </div>
</template>

<script>
export default {
  name: 'HomeHeader',
  props: {
    city: String
  }
}
</script>

<style lang="stylus" scoped>
  @import '~s/varibles.styl'
  .header
    display flex
    align-items center
    justify-content space-between
    width 100%
    height $headerHeight
    background-color $ThemeColor
    font-size 0.28rem
    color #fff
    .header-left
      width 0.8rem
      font-size 0.4rem
      span
        text-align center
        margin-left 0.15rem
    .header-center
      position relative
      flex 1
      background-color #fff
      border-radius .05rem
      height 0.6rem
      line-height 0.6rem
      color #9c9c9c
      margin-right 0.25rem
      padding-left 0.2rem
      span
        font-size 0.4rem
        color #ddd
      i
        position absolute
        display inline-block
        left .7rem
        top 0
    .header-right
      color #fff
      padding-right .28rem
      i
        margin-left 0.1rem
      span
        font-size 0.26rem
</style>
